package easyway.core.exceptions;

/**
 * 应用异常
 *
* @author zhangqihang
* @date Nor 23, 2009
 */
public class ApplicationException extends Exception {

	private static final long serialVersionUID = 2087667949384558106L;

	public ApplicationException(String msg) {
		super(msg);
	}

	public ApplicationException(Throwable cause) {
		super(cause);
	}

	public ApplicationException(String msg, Throwable cause) {
		super(msg, cause);
	}
	
	/**
	 * 将应用异常转化为系统异常
	 * 
	 * @return RuntimeException的子类
	 */
	public SystemException asSystemException() {
		SystemException systemException = new SystemException(this);
		systemException.setStackTrace(this.getStackTrace());
		return systemException;
	}

}
